package
{
	import com.lx.display.Graph;
	
	import flash.display.MovieClip;
	import flash.display.Shape;
	import flash.display.Sprite;
	
	public class TestDisplay extends Sprite
	{
		public function TestDisplay()
		{
			var _circle:Sprite = Graph.getSprite;
			Graph.fill(0xff0000);
			Graph.line(2,0x000000);
			Graph.typeCircle.draw(20);
			addChild(_circle);
			
			var _ellipse:MovieClip = Graph.getMovieClip;
			Graph.fill(0xff0000);
			Graph.line(2,0x000000);
			Graph.typeEllipse.draw(40,30);
			addChild(_ellipse);
			
			var _rectangle:Shape = Graph.getShape;
			Graph.fill(0xff0000);
			Graph.line(2,0x000000);
			Graph.typeRectangle.draw(50,50);
			addChild(_rectangle);
			
			var _roundRectangle:Sprite = Graph.getSprite;
			Graph.fill(0xff0000);
			Graph.line(2,0x000000);
			Graph.typeRoundRectangle.draw(50,50,25,25);
			addChild(_roundRectangle);
			
			var _triangles:MovieClip = Graph.getMovieClip;
			Graph.fill(0xff0000);
			Graph.line(2,0x000000);
			Graph.typeTriangles.draw(Vector.<Number>([ 
				10,10,  100,10,  10,100]));
			addChild(_triangles);
				
			rank(_circle,_ellipse,_rectangle,_roundRectangle,_triangles);
		}
		
		private function rank(...arg):void
		{
			for (var i:int = 0; i < arg.length; i++) 
			{
				arg[i].x = i%5*100;
				arg[i].y = int(i/5)*50;
			}
		}
	}
}